﻿@{
    ViewBag.Title = "IndexEmpresa";
}


<br /><br /><br /><br />
<div align="center">
    <img src="~/Content/images/empresas.png" />
   <table class="table table-hover">
        <thead>
            <tr>
                <th class="success">Id</th>
                <th class="success">Codigo</th>
                <th class="success">Nombre</th>
                <th class="success">Opciones</th>

            </tr>
        </thead>
        <tbody>
            @foreach (Model.Empresa item in Model)
            {
                <tr>
                    <td>@item.id</td>
                    <td>@item.codigo</td>
                    <td>@item.nombre</td>
                    <td width="30%">
                        <a href="@Url.Action("Editar")?id=@item.id">
                            <button type="button" class="btn btn-success">
                                Editar
                                <span class="glyphicon glyphicon-pencil"></span>
                            </button>

                        </a>
                        <a href="@Url.Action("Eliminar")?id=@item.id">

                            <button type="button" class="btn btn-danger">
                                Eliminar
                                <span class="glyphicon glyphicon-trash"></span>
                            </button>

                            </a>                       
                    </td>
                </tr>
            }
    </table>

    <div class="text-center">
        <a href="@Url.Action("Agregar", "Empresa")" class="btn btn-primary btn-lg active" role="button">Agregar</a>
        <a href="@Url.Action("Index", "Home")" class="btn btn-primary btn-lg active" role="button">Volver</a>
        

    </div>
    </div>